<?php
include_once "../../../../common.php";
?>
<h2>Contactpersonen</h2>
<?php

$query = "	SELECT 
				WC.* 
			FROM WebshopContactpersonen AS WC 
			WHERE WC.WebshopID = '".str_replace("'","",$_GET['id'])."'";
$result = $_MySQL->runQuery($query);
?>
<table width="100%;">
	<tr>
		<td colspan="3" align="left">
			<input type="button" value=" Contactpersoon toevoegen " onClick="javascript:  openPopup('pop/addContactpersoon.php?id=<?=$_GET['id'];?>', 500, 600, 'Contactpersoon toevoegen');" /> 
		</td>
	</tr>
<?php
while($row = mysql_fetch_assoc($result))
{	
	?>
	<tr>
		<td width="40%">
			Sex
		</td>
		<td width="10px">:</td>
		<td>
			<?=getSexName($row['Sex']);?>
		</td>
	</tr>
	<tr>
		<td width="40%">
			Firstname
		</td>
		<td width="10px">:</td>
		<td>
			<?=$row['Firstname'];?>
		</td>
	</tr>
	<tr>
		<td>
			Initials
		</td>
		<td>:</td>
		<td>
			<?=$row['Initials'];?>
		</td>
	</tr>
	<tr>
		<td>
			Surname
		</td>
		<td>:</td>
		<td>
			<?=$row['Surname'];?>
		</td>
	</tr>
	<tr>
		<td>
			Insertion
		</td>
		<td>:</td>
		<td>
			<?=$row['Insertion'];?>
		</td>
	</tr>
	<tr>
		<td>
			Function
		</td>
		<td>:</td>
		<td>
			<?=$row['Function'];?>
		</td>
	</tr>
	<tr>
		<td>
			Email
		</td>
		<td>:</td>
		<td>
			<?=$row['Email'];?>
		</td>
	</tr>
	<tr>
		<td>
			Mobile
		</td>
		<td>:</td>
		<td>
			<?=$row['Mobile'];?>
		</td>
	</tr>
	<tr>
		<td>
			CreateDate
		</td>
		<td>:</td>
		<td>
			<?=getNiceDateformat($row['CreateDate']);?>
		</td>
	</tr>
	<tr>
		<td>
			FirstNameBasis
		</td>
		<td>:</td>
		<td>
			<?=$row['FirstNameBasis']=='1'?'Ja':'Nee';?>
		</td>
	</tr>
	<tr>
		<td colspan="3" align="right">
			<input type="button" value=" Bewerken " onClick="javascript:  openPopup('pop/editContactpersoon.php?id=<?=$row['ID'];?>', 500, 600, 'Bewerken Contactpersoon');" /> 
		</td>
	</tr>
	<?php
}
?>
</table>